NinePatch

Undocumented in source.

Constructors

this
this(IHipTexture tex, NinePatchType t)
Undocumented in source.
this
this(uint width, uint height, IHipTexture tex, NinePatchType type)
Undocumented in source.

Members

Functions

build
void build()
Undocumented in source. Be warned that the author may not have intended to support it.
draw
void draw()
Undocumented in source. Be warned that the author may not have intended to support it.
getVertices
HipSpriteVertex[4 * 9] getVertices()
Undocumented in source. Be warned that the author may not have intended to support it.
setBotLeft
void setBotLeft(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setBotMid
void setBotMid(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setBotRight
void setBotRight(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setColor
void setColor(HipColor color)
Undocumented in source. Be warned that the author may not have intended to support it.
setMidLeft
void setMidLeft(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setMidMid
void setMidMid(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setMidRight
void setMidRight(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setPosition
void setPosition(float x, float y)
Undocumented in source. Be warned that the author may not have intended to support it.
setSize
void setSize(int width, int height)
Undocumented in source. Be warned that the author may not have intended to support it.
setTextureRegions
void setTextureRegions(uint x, uint y, uint width, uint height)

The arguments will be divided by the texture width and height for generating the UVs

setTextureRegions
void setTextureRegions()

Cuts the entire image in 9 slices

setTopLeft
void setTopLeft(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setTopMid
void setTopMid(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
setTopRight
void setTopRight(TextureCoordinatesQuad q)
Undocumented in source. Be warned that the author may not have intended to support it.
updatePosition
void updatePosition()

Use this function instead of build for less overhead

Static functions

fromQuads
NinePatch fromQuads(AtlasRect[9] rects, IHipTexture tex, int width, int height, NinePatchType t)

Creates a NinePatch from the matrix, starting from left to right, top to bottom

Variables

height
uint height;
Undocumented in source.
scaleX
float scaleX;
scaleY
float scaleY;
Undocumented in source.
sprites
HipSprite[9] sprites;
Undocumented in source.
stretchStrategy
NinePatchType stretchStrategy;
Undocumented in source.
texture
IHipTexture texture;
Undocumented in source.
vertices
HipSpriteVertex[9 * 4] vertices;
Undocumented in source.
width
uint width;
Undocumented in source.
x
float x;
y
float y;
Undocumented in source.

Meta